﻿@model Banking.Domain.Operation

@using Banking.Web;
           
@{
    string participants = Model.ListParticipants();
    string date = Model.Date.ToString(Helper.DateFormat);       
}

<div data-entity="operation" data-view="edit" data-id=@Model.ID>    
    <form>
        <h3>Edit operation</h3>
        <label for="date">Date</label>
        <div class="datePicker_wrapper">@Html.EditorFor(op => date)</div>
        <label for="Amount">Amount</label>
        <div>@Html.EditorFor(op => op.Amount)</div>
        <label for="Mark">Mark</label>
        <div>@Html.EditorFor(op => op.Mark)</div> 
        <label for="Description">Description</label>
        <div>@Html.EditorFor(op => op.Description)</div>
        Participants<div class="editOperationPersons">@Html.Action("SelectParticipants", new { op = Model })</div>
       
        <div class="buttons">
            <button type="button" data-action="cancel"><img src="../../Content/images/cancel.png" /> Cancel</button>
            <button type="submit" data-action="save" class="default"><img src="../../Content/images/save.png" /> Save</button>
            <button type="button" data-action="delete" data-entity="operation" data-create="false"><img src="../../Content/images/delete.png" /> Delete</button>
        </div>
    </form>
</div> 